#!/usr/bin/env node

const args = process.argv.slice(2)
const scriptName = args[0] || 'sse'

async function run() {
  try {
    switch (scriptName) {
      case 'stdio':
        console.error('Please use sse')
        break
      case 'sse':
        await import('./sse.js')
        break
      case 'streamableHttp':
        console.error('Please use sse')
        break
      default:
        console.error(`Unknown script: ${scriptName}`)
        console.log('Available scripts:')
        console.log('- stdio')
        console.log('- sse')
        console.log('- streamableHttp')
        process.exit(1)
    }
  } catch (error) {
    console.error('Error running script:', error)
    process.exit(1)
  }
}

run()
